<template>
  <div>
    <h2>Home组件</h2>
    <button @click="gotoMovie(3)">gotoMovie</button>
  </div>
</template>

<script>
export default {
    name:'MyHome',
    methods:{
      gotoMovie(id){
        // 编程式导航到movie3 页面
        this.$router.push('/movie/'+id)
      }
    }

}
</script>

<style>

</style>